﻿@model List<SarahShop.Models.Product>

<div class="top_main">
    <h2>Sản phẩm</h2>
    <div class="clear"></div>
</div>
<!-- start grids_of_3 -->
<div class="grids_of_3">
    @for(int i = 0; i < Model.Count(); i++)
    {
        string text = Model[i].Status == 1 ? "New" : Model[i].Status == 2 ? "Sale" : "";
        string cls = text == "New" ? "price1 bg" : text == "Sale" ? "price1 bg1" : "";
        
        <div class="grid1_of_3">
            <a href="details.html">
                <img src="~/Content/images/@Model[i].Image1" alt="" />
                <h3>@Model[i].Name</h3>
                <span class="price">$@Model[i].Price.ToString("N0")</span>
                <span class="@cls">text</span>
            </a>
        </div>
    }
    <div class="clear"></div>
</div>
